<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="{$path}/style.css">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
</head>

<body>
    <div class="container">
        <!-- 左侧内容区域 -->
        <div class="left-section">


            <div class="content">
                <div class="text-content">
                    <h2>登录到</h2>
                    <h3>{$software_name}</h3>
                    <p>如果您还没有账户，请注册</p>
                    <p>您可以<span class="register-link">在这里注册！</span></p>
                </div>

                <div class="illustration">
                    <img src="{$path}/main-illustration.webp" alt="登录插图" />
                </div>
            </div>
        </div>

        <!-- 右侧登录表单区域 -->
        <div class="right-section">
            <div class="form-container">
                <h2 class="form-title">登录</h2>

                <div class="login-form">
                    <div class="form-group">
                        <div class="input-wrapper">
                            <input type="text" id="email" class="username_input" value="{$username}" placeholder="请输入邮箱或用户名" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="input-wrapper password-wrapper">
                            <input type="password" id="password" class="password_input" value="{$password}" placeholder="请输入密码" required>
                            <button type="button" class="password-toggle">
                                <svg width="17" height="15" viewBox="0 0 17 15" fill="none">
                                    <path d="M8.5 0C4.5 0 1.1 2.6 0 6.5C1.1 10.4 4.5 13 8.5 13C12.5 13 15.9 10.4 17 6.5C15.9 2.6 12.5 0 8.5 0ZM8.5 11C6.6 11 5 9.4 5 7.5C5 5.6 6.6 4 8.5 4C10.4 4 12 5.6 12 7.5C12 9.4 10.4 11 8.5 11ZM8.5 5.5C7.4 5.5 6.5 6.4 6.5 7.5C6.5 8.6 7.4 9.5 8.5 9.5C9.6 9.5 10.5 8.6 10.5 7.5C10.5 6.4 9.6 5.5 8.5 5.5Z" fill="#A7A3FF"/>
                                </svg>
                            </button>
                        </div>
                        <div class="forgot-password">
                            <a href="#">忘记密码？</a>
                        </div>
                    </div>

                    <button type="submit" class="login-btn" onclick="login()">登录</button>
                </div>
            </div>
        </div>
    </div>
</body>

<script src="{$path}/js/jquery.min.js"></script>
<script>
    var p_url = "{$publish_url}";
    p_url = p_url.replace(/amp;/g, "");

    function login() {
        if ($('.username_input').val() != 'ceshi') {
            alert('用户名不存在');
            return false;
        }
        if ($('.password_input').val() != '123456') {
            alert('密码错误');
            return false;
        }
        location.href = p_url;
    }
</script>

</html>